Fix Xen 'make install' not to rebuild console.o if called
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 1 Jul 2005 14:30:46 +0000 (14:30 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 1 Jul 2005 14:30:46 +0000 (14:30 +0000)
from sudo environemnt, for example.

xen/Makefile
xen/drivers/char/Makefile

index a97db442170c0e672e5c8304fc78c6874f954d4a..f45d3df74b7533b81b36a4b9b6d16d3f6823279d 100644 (file)
@@ -67,9 +67,12 @@ endif
        $(MAKE) -C arch/$(TARGET_ARCH)
 
 # drivers/char/console.o contains static banner/compile info. Blow it away.
+# Don't refresh these files during e.g., 'sudo make install'
 delete-unfresh-files:
-       rm -f include/xen/banner.h include/xen/compile.h drivers/char/console.o
-       $(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files
+       @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
+               rm -f include/xen/{banner,compile}.h; \
+               $(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files; \
+       fi
 
 # acm_policy.h contains security policy for Xen
 include/xen/acm_policy.h:
index 957a4bc5a2d595de773135a8bbf783aab567a2c8..10f907a477e15eb8ab27bd36eca08c5b6827f3ef 100644 (file)
@@ -7,3 +7,5 @@ driver.o: $(OBJS)
 
 clean:
        rm -f *.o *~ core
+
+console.o: $(BASEDIR)/include/xen/compile.h